package oop_05.homework_01;

public class Dog extends Animal  {
    public Dog(String name, int health) {
        super(name, health);
    }

    @Override
    public void cry() {
        System.out.println("汪汪汪!!!");
    }

    @Override
    public void eat() {
        System.out.println("吃骨头");
    }

    public void lookHouse(){
        int oldHealth = this.getHealth();
        System.out.println(this.getName()+"正在看家~~~~,主人很高兴,给它骨头吃");
        eat();
        this.setHealth(oldHealth+10);
        System.out.println(this.getName() + "当前的健康值是:" + this.getHealth() );
    }
}
